<?php

namespace app\home\model;
use think\Model;
use think\Db;

class ProductMessageModel extends Model
{

    protected $name = 'product_message';
    protected $autoWriteTimestamp = true;
    /**
     * insertOneMessage [ 插入一条产品留言信息 ]
     * @author [Boot.Z] [852952656@qq.com]
     */
    public function insertOneMessage($param)
    {
        if ($this->allowField(true)->save($param)){
            return ['code' => 1,'msg' => '发布成功，等待管理员审核'];
        }else{
            return ['code' => -1,'msg' => '错误！'];
        }
    }
}